3 SynthDef("env", { arg i_outbus=0;
6 // make a dummy 8 segment envelope
9 // create a control argument array
10 envctl = Control.names([\env]).kr( env.asArray );
12 ReplaceOut.kr(i_outbus, EnvGen.kr(envctl, doneAction: 2));
17 Out.ar(0, SinOsc.ar(In.kr(0), 0, 0.2));
21 s.sendMsg(\c_set, 0, 800);
23 s.sendMsg(\s_new, \sine, 1001, 1, 0);
25 e = Env([700,900,900,800], [1,1,1]*0.4, \exp).asArray;
26 s.sendBundle(nil,[\s_new, \env, 1002, 2, 1001],[\n_setn, 1002, \env, e.size] ++ e);
28 f = Env([1000,1000,800,1000,900,1000], [1,1,1,1,1]*0.3, \step).asArray;
29 s.sendBundle(nil,[\s_new, \env, 1003, 2, 1001],[\n_setn, 1003, \env, f.size] ++ f);
31 s.sendMsg(\n_free, 1001);